import React from 'react'
import {
  Route,
  Link,
  Switch,
  Redirect,
  NavLink,
  withRouter,
} from 'react-router-dom'
import Home from './components/Home'
import Detail from './components/Detail'

function App(props) {
  console.log(props)
  return (
    <div>
      App
      <hr />
      <Link to="/home">home</Link>
      <Link to="/detail">detail</Link>
      <hr />
      <Route path="/" component={Home} exact></Route>
      <Route path="/home" component={Home}></Route>
      <Route path="/detail" component={Detail}></Route>
      <hr />
    </div>
  )
}
const WithApp = withRouter(App)
export default WithApp
